how to get random colors in js

140

js random hex color -

'#'+Math.floor(Math.random()*16777215).toString(16);

how to get random colors in js -

var randomColor = Math.floor(Math.random()*16777215).toString(16);

Comments

Submit
0 Comments